]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
workspace: Use mutter's work area calcuating rather than doing it manually
authorJasper St. Pierre <jstpierre@mecheye.net>
Mon, 28 Jan 2013 04:17:53 +0000 (23:17 -0500)
committerJasper St. Pierre <jstpierre@mecheye.net>
Thu, 7 Feb 2013 03:35:10 +0000 (22:35 -0500)
https://bugzilla.gnome.org/show_bug.cgi?id=692680

js/ui/workspace.js

index 34ffcf4aa183fefa9c0816568f477b66fbd4ba5c..bea9a6197f33dc1dfaf6916b6d5d64f9dba9bc6c 100644 (file)
@@ -295,17 +295,7 @@ const WindowClone = new Lang.Class({
 
         let [width, height] = this.actor.get_transformed_size();
 
-        let monitorIndex = this.metaWindow.get_monitor();
-        let monitor = Main.layoutManager.monitors[monitorIndex];
-        let availArea = new Meta.Rectangle({ x: monitor.x,
-                                             y: monitor.y,
-                                             width: monitor.width,
-                                             height: monitor.height });
-        if (monitorIndex == Main.layoutManager.primaryIndex) {
-            availArea.y += Main.panel.actor.height;
-            availArea.height -= Main.panel.actor.height;
-        }
-
+        let availArea = this.metaWindow.get_work_area_current_monitor();
         this.actor.x = _clamp(this.actor.x, availArea.x, availArea.x + availArea.width - width);
         this.actor.y = _clamp(this.actor.y, availArea.y, availArea.y + availArea.height - height);
     },